package com.itheima.method.method4;

public class Test3 {
    public static void main(String[] args) {
        int[] arr = {11, 22, 33, 56, 44, 55};
        get(arr);
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
    }

    public static void get(int[] arr) {
        int max = arr[0];
        int index = 0;
        for (int i = 1; i < arr.length; i++) {
            if (arr[i] > max) {
                max = arr[i];
                index = i;
            }
        }
        arr[index] -= 10;
    }
}
